﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace BDShop.Configuration
{
    public class BDShopConfiguration
    {
        private static BDShopConfigurationSection instance;

        private static BDShopConfigurationSection GetInstance()
        {
            if (instance == null)
            {
                instance = (BDShopConfigurationSection)ConfigurationManager.GetSection("BDShop.configuration");
            }

            return instance;
        }

        public static CacheElement Cache
        {
            get { return GetInstance().CacheElement; }
        }

        public static StorageElement Storage
        {
            get { return GetInstance().StorageElement; }
        }

        public static KeyElement Key
        {
            get { return GetInstance().KeyElement; }
        }

        public static WebElement Web
        {
            get { return GetInstance().WebElement; }
        }
    }
}
